#pragma once
#include "Support.h"
#include "Entity\Arrow.h"
#include "GameLayer.h"
USING_NS_CC;

class ArrowNode : public Node {
public:
	static ArrowNode* createArrowNode(Arrow *arrow, float angle, Node *gameLayer);
	Rect getCollisionArea();
	Vec2 getCollisionPoint();
	int getAirSpeed();
	int getKnockBack();
	int getRange();
	void setAirSpeed(int airSpeed);
	void setKnockBack(int knockBack);
	void setRange(int range);
protected:
	bool initArrowNode(Arrow *arrow, float angle, Node *gameLayer);
private:
	Arrow *m_arrow;
	Node *m_gameLayer;
	Sprite *m_showSprite;
	Vec2 m_collisionPoint;
};